FROM eclipse-temurin:21-jre

WORKDIR /app

RUN mkdir -p /config

COPY target/*.jar spring-boot-cli.jar
COPY config/ config/

RUN chmod +x config/start.sh

ARG PROFILE
ENV TZ=Asia/Shanghai
ENV JAVA_OPTS="-Xms256m -Xmx2048m"

# 与项目端口一致
EXPOSE 8080

ENTRYPOINT ["./config/start.sh"]